<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
    <meta charset="UTF-8">
    <title>多文件上传</title>
    <script src="./../lib/jquery-3.7.0.js"></script>
    <script>
        $(function () {
            let buttons = $("button");
            buttons.eq(0).click(function () {    /* 给增加按钮添加单机事件 */
                let temp = $("<div></div>");
                let file = $("<input type='file'>");
                let button = $("<button onclick='del()'>删除</button>");
                temp.append(file);
                temp.append(button);
                $("#con").append(temp);
            })

        });

        function del(){
           $(event.target.parentNode).remove();
        }
    </script>
</head>
<body>
选择要上传的文件：<br>
<input type="file">
<button>增加</button>
<div id="con"></div>
</body>
</html>